﻿@model ListViewModel<CommonSearchValues, IQueryable<QizSession>>
@{
    ViewBag.Title = "常规随访单查询";
}
@using (Ajax.BeginForm("QizSessionList", new { IsView = false }, new AjaxOptions { HttpMethod = "Post", LoadingElementId="OnLoadingSpan",UpdateTargetId = "main", OnFailure = "OnSiteError" }))
{<p>
    <fieldset>
        <legend>
            <div class="catalog-title">
                常规随访单查询</div>
        </legend>
        @Html.HiddenFor(m => Model.PageSize)
       <input type="hidden" name="PageIdx" id="qspidx" value="0" />
        随访名称： @Html.DropDownListFor(m => m.SearchFrom.V1, new SelectList(ViewBag.Subjects, "ID", "Title", Model.SearchFrom.V1), "全部")
        开始时间：@Html.EditorFor(m => m.SearchFrom.V3, "DateTimeStr")
        结束时间：@Html.EditorFor(m => m.SearchTo.V3, "DateTimeStr")
        @Helpers.SubmitButton("查询", "qssubmit")
    </fieldset>
    </p>
}
<table class="width">
    <tr>
        <th>
            常规随访名称
        </th>
        <th>
            医院
        </th>        
        <th>
            科室
        </th>
        <th>
            病区
        </th>
        <th>
            填报时间
        </th>
        <th>
            检查时间
        </th>
        <th>
            自动诊断结果
        </th>
        <th>
            操作
        </th>
    </tr>
    @{int dColor = 0;}
    @foreach (var item in Model.Data)
    {
        <tr class="tr-backColor@(dColor++%2)" style="@(item.SessionAutoEvaluation=="异常"?"color:red":"")">
            <td>@Html.DisplayFor(model => item.QizSubject.Title)
            </td>
            <td>@Html.DisplayFor(model => item.QizSubject.Hospital.HospName)
            </td>
            <td>@Html.DisplayFor(model => item.QizSubject.Department.BingQu.Title)
            </td>
            <td>@Html.DisplayFor(model => item.QizSubject.Department.DepName)
            </td>
            <td>@Html.DisplayFor(model => item.CreationTime)
            </td>
            <td>@Html.DisplayFor(model => item.Timemark)
            </td>
            <td>@(item.SessionAutoEvaluation=="异常"?item.SessionAutoEvaluation:string.Empty)
            </td>
            <td>
                @Html.ActionLink("[详细]", "QizSessionEdit", new { ID = item.ID, PreviewOnly = true, _newpage = "true" }, new { target = "_blank" })
                @Html.ActionLink("[随访历史]", "RecuperReport", new { qizSubjectID = item.QizSubjectID, recuperID = item.Recuper.RecuperID, pageIndex = 0 }, new { target = "_blank" })                
                
            </td>
        </tr>
    }
</table>
@Html.Partial("Pagger", new PaggerViewModel { Act = "QizSessionList", PageIdx = Model.PageIdx, PageCount = Model.PageCount, ItemCount = Model.ItemCount })

@Html.Partial("TrHilighter")